package design.patterns.decorator.order;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2020/6/10 12:00
 */

public class FooterDecorator extends OrderDecorator {
    private Order order;

    public FooterDecorator(Order order) {
        super(order);
    }

    public void print() {
        super.order.print();
        printFooter();
    }

    private void printFooter() {
        System.out.println("========================================================");
        System.out.println("Total\t\t\t\t" +
                formatCurrency(super.order.getGrandTotal()));
    }
}
